package datas;

import java.awt.geom.Point2D;

public class Vertex {
	private static int current_id = 0;
	
	private int id = current_id++;
	private Point2D pos;
	
	public Vertex(Point2D _p) {
		this.pos = new Point2D.Double(_p.getX(), _p.getY());
	}
	
	public Vertex(int _id, Point2D _p) {
		this.id = _id;		
		this.pos = new Point2D.Double(_p.getX(), _p.getY());
	}
	
	public int getIndex() {
		return this.id;
	}
	
	public Point2D getPosition() {
		return this.pos;
	}	
	
	public void move(Point2D _p) {
		this.pos = _p;
	}
	
	public static void changeID(int _id) {
		current_id = _id;
	}
}
